package com.example.back.dao.records;

import com.example.back.bean.records.PlayerRoomMode;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface PlayerRoomModeDao {

    @Select("select user_inf.userId,user_inf.name,user_inf.playingTableId,user_inf.level,table_inf.roomId,table_inf.playType from user_inf , table_inf where user_inf.playingTableId = table_inf.tableId and user_inf.isOnline =1 ")
    List<PlayerRoomMode> getOnlineTable();

    @Select("select user_inf.userId,user_inf.name,user_inf.playingTableId,user_inf.level,table_inf.roomId,table_inf.playType from user_inf , table_inf where user_inf.playingTableId = table_inf.tableId and user_inf.isOnline =1 and table_inf.playType = 222 and table_inf.roomId != 0")
    List<PlayerRoomMode> getCsMjOnlineTable();

    @Select("select user_inf.userId,user_inf.name,user_inf.playingTableId,user_inf.level,table_inf.roomId,table_inf.playType from user_inf , table_inf where user_inf.playingTableId = table_inf.tableId and user_inf.isOnline =1 and table_inf.playType = 16 and table_inf.roomId != 0")
    List<PlayerRoomMode> getPdkOnlineTable();
}
